import re
def reasoning_steps_reward(completions,**kwargs):
    pattern = r"(Step \d+:|^\d+\.|\n-|\n*|First,|Second,|Next,|Finally,)"
    completion_contents = [completion[0]["content"] for completion in completions]
    matches = [len(re.findall(pattern,content,re.MULTILINE))
               for content in completion_contents]
    return [min(1.0,count / 3) for count in matches]